package backend;

import org.w3c.dom.Document;
import org.w3c.dom.NodeList;


public class Languages {
	private String langs[];
	private String url="http://eiffel.itba.edu.ar/hci/service/Common.groovy?method=GetLanguageList";

	public void initialize() {
		try{
			Connect con = new Connect();
			Document dom = con.getConection(url);
			NodeList languages = dom.getElementsByTagName("name");
			this.langs = new String[languages.getLength()];
			for(int i=0; i<languages.getLength(); i++){
				langs[i]=new String(languages.item(i).getTextContent());
			}
		}catch(Exception e){
			
		}
	}
	public String[] getLanguages(){
		return this.langs;
	}
	
}
